<?php if(isset($upload_data)){?>
<img src="<?php echo image('uploads/' . $upload_data['file_name'] . '', 'medsquare'); ?>" />
<?php }elseif (isset($error2)) {?>
<img src="<?php echo base_url('uploads/default.png');?>" id="imageArea" style="cursor:pointer;"/>
<font color="red"><?php echo isset($error2)?$error2:'';?></font>
<?php
} 
?>